const fn = (state = {
	avatar: '',
  birthday: ''
}, action) => {
  const { type, data } = action;
  switch (type) {
	case 'CHANGE_BIRTHDAY':
	const avatar = state.avatar
	  state = {
		birthday: data,
		avatar:avatar
	  }
	  return state;
	case 'CHANGE_AVATAR':
	  const birthday = state.birthday
	  state = {
			birthday: birthday,
			avatar: data
	  }
	  return state;
	default:
      return state;
  }
}

export default fn;